// 初始化导入
import { createApp } from "vue";
import { createPinia } from "pinia";
import App from "./App.vue";
import router from "./router";
// 初始化样式
import "@/styles/common.scss";
import { lazyPlugin } from "@/directives/index";

import { componentPlugin } from "@/components/index";
import piniaPluginPersistedstate from "pinia-plugin-persistedstate";

const app = createApp(App);
const pinia = createPinia();
// 注册pinia插件
pinia.use(piniaPluginPersistedstate);

app.use(pinia);
app.use(router);

// 注册全局组件
app.use(componentPlugin);
// 注册懒加载组件
app.use(lazyPlugin);

app.mount("#app");
